<?php
/**
 * Created by PhpStorm.
 * User: 64423
 * Date: 2018/10/16
 * Time: 11:41
 */

namespace app\shop\model;


use think\Model;

class ArticleCommentModel extends Model
{
    protected $table = 'dp_article_comment';
    protected $pk = 'id';
    protected $field = true;


    //收藏
    public static function add($user_id,$art_id,$content,$time)
    {

        return self::insert(['user_id'=>$user_id,'art_id'=>$art_id,'content'=>$content,'time'=>$time]);

    }

    public static function getList($id)
    {

        return self::where('art_id',$id)->order('time desc')->select();

    }


}